﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="TrackingTree.aspx.cs" Inherits="Mercator2.WebForm3" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
    <style type="text/css">
        .style3
        {
            width: 100%;
        }
        .style4
        {
            text-align: left;
        }
        .style6
        {
            width: 664px;
            text-align: left;
        }
    </style>
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

 <%--   <script language="javascript" type="text/javascript">

<script>
    function foo() {
        var o = window.event.srcElement;
        var s = event.srcElement.id;
        s = s.replace("TreeView1t", "TreeView1n");
        // take the checkbox val off so as to be able to check if the node has an
        // image href - if it does then the node has children    
        s = s.replace("CheckBox", "");
        var ch = document.getElementById(s);
        if (ch != null && o.tagName == "INPUT" && o.type == "checkbox") {
            __doPostBack("", "");
        }
    }

    function postbackOnCheck(e) { 
        var isNav = (window.navigator.appName.toLowerCase().indexOf("netscape")>=0); 
        var o; 

        if (isNav && e != null) 
            o = e.target; 
        else 
            o = window.event.srcElement; 
        if (o.tagName == 'INPUT' && o.type == 'checkbox' && o.name != null && o.name.indexOf('CheckBox') > -1) 
            __doPostBack("",""); 
    } 
</script>


</script>
--%>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
        ConnectionString="<%$ ConnectionStrings:MERCATOR_histConnectionString %>" 
        SelectCommand="SELECT * FROM [Device]"></asp:SqlDataSource>
        <asp:Literal ID="js" runat="server"></asp:Literal>
        <table class="style3">
            <tr>
                <td align="left" class="style4" style="border-style: solid" 
                    valign="top" colspan="2">
        <asp:TextBox ID="txtAddress" runat="server" Height="123px" TextMode="MultiLine" 
            Width="921px" Font-Bold="True" style="margin-top: 0px" Visible="False"></asp:TextBox>
                    <asp:GridView ID="addressGrid" runat="server" AllowPaging="True" Width="922px" 
                        style="text-align: justify">
                    </asp:GridView>


                </td>
            </tr>
            <tr>
                <td align="left" class="style4" style="border-style: solid" 
                    valign="top">
        <asp:TreeView ID="TreeView1" runat="server" ShowCheckBoxes="Leaf" Height="84px" 
                        onclick="javascript:postbackOnCheck(event)"
                        ShowLines="True" 
                        ontreenodecheckchanged="TreeView1_SelectedNodeChanged1" 
                        ImageSet="XPFileExplorer" NodeIndent="15" 
                        onselectednodechanged="TreeView1_SelectedNodeChanged" Width="62px">
            <DataBindings>
                <asp:TreeNodeBinding DataMember="System.Data.DataRowView" 
                    TextField="Text" ValueField="DeviceID" ShowCheckBox="True" />
            </DataBindings>
            <HoverNodeStyle Font-Underline="True" ForeColor="#6666AA" />
            <NodeStyle Font-Names="Tahoma" Font-Size="8pt" ForeColor="Black" 
                HorizontalPadding="2px" NodeSpacing="0px" VerticalPadding="2px" />
            <ParentNodeStyle Font-Bold="False" />
            <SelectedNodeStyle BackColor="#B5B5B5" Font-Underline="False" 
                HorizontalPadding="0px" VerticalPadding="0px" />
        </asp:TreeView>


                </td>
                <td align="left" class="style6" style="border-style: solid" 
                    valign="top">
        <div id="map_canvas" 
            style="width: 99%; height: 728px; margin-bottom: 2px; margin-top: 5px;" 
            __designer:mapid="6f">
        </div>


                </td>
            </tr>
    </table>

<%--    <script type="text/javascript">
        if (document.all) {
            document.getElementById('TreeView1').onclick = foo;
        }
    </script>--%>

</asp:Content>
